class clusters::yumupdate (
 $enable_update = false,
)
{
  #case $operatingsystemmajrelease {
  #'6': {
  #    exec { "yum_update" :
  #       command => "/usr/bin/yum  -y update",
  #       path => "/usr/bin/yum",
  #       unless => "/bin/rpm -q  kernel-2.6.32-754.17.1.el6.x86_64",
  #       onlyif => "/bin/rpm -q  lustre-client-modules-2.5.3-2.6.32_754.17.1.el6.x86_64.x86_64",
  #       timeout => "1000",
  #    }

  #    exec { "remove_kernel" :
  #       command => "/bin/rpm -e kernel-2.6.32-642.15.1.el6.x86_64 --nodeps;/bin/rpm -e kernel-devel-2.6.32-642.15.1.el6.x86_64 --nodeps; /bin/rpm -e kernel-2.6.32-642.6.2.el6.x86_64 --nodeps; /bin/rpm -e kernel-devel-2.6.32-642.6.2.el6.x86_64 --nodeps; /bin/rpm -e kernel-2.6.32-696.18.7.el6.x86_64 --nodeps;/bin/rpm -e kernel-devel-2.6.32-696.18.7.el6.x86_64 --nodeps;/bin/rpm -e kernel-2.6.32-696.13.2.el6.x86_64 --nodeps;/bin/rpm -e kernel-devel-2.6.32-696.13.2.el6.x86_64 --nodeps; /bin/rpm -e kernel-debug-2.6.32-504.3.3.el6.x86_64 --nodeps; /bin/rpm -e kernel-debug-2.6.32-642.6.2.el6.x86_64 --nodeps;/bin/rpm -e kernel-debug-devel-2.6.32-696.20.1.el6.x86_64 --nodeps;/bin/rpm -e kernel-debug-2.6.32-642.15.1.el6.x86_64 --nodeps",
  #       path => "/bin/rpm",
  #       unless => "/bin/rpm -q kernel-2.6.32-754.17.1.el6.x86_64",
  #       timeout => "1000",
  #    }
  #   }
  #'7':{
     if $enable_update{
      exec { "yum_update" :
         command => "/usr/bin/yum  -y update -x kernel-debuginfo*",
         path => "/usr/bin/yum",
         unless => "/bin/rpm -q  kernel-3.10.0-1160.80.1.el7.x86_64",
         timeout => "1000",
      }
     }
     #}
      #exec { "reboot" :
      #   command => "/bin/touch /root/20170313-0900;/bin/echo b > /proc/sysrq-trigger",
      #   path => "/bin;/usr/bin;/sbin",
      #   unless => "/usr/bin/test -e  /root/20170313-0900",
      #   timeout => "1000",
      #}
  #}
  #exec { "remove_krb5" :
  #  command => "/usr/bin/yum  remove -y krb5-workstation",
  #  path    => "/usr/bin/yum",
  #  onlyif  => "/usr/bin/test -L /usr/bin/kpasswd"
  #}
}
